/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
 *
 */

import { NativeCodemodel } from './native-codemodel.js';

export class NativeLibraryModel {
  private _buildCommand: string | undefined;
  private _buildCommandComponents: string[] | undefined;
  private _buildType: string | undefined; // target
  private _toolchain: string | undefined;
  private _groupName: string | undefined;
  private _abi: string | undefined; // abiFilter
  private _artifactName: string; // name in NativeTarget
  private _folders: string[] | undefined; // includes in NativeTarget
  private _files: string[] | undefined; // sources in NativeTarget
  private _headers: string[] | undefined;
  private _codemodel: NativeCodemodel | undefined;
  private _nameOnDisk: string | undefined;

  private _outputs: string[] | undefined; // artifacts in NativeTarget
  private _runtimeFiles: string[] | undefined;
  private _build: string | undefined;
  private _source: string | undefined;
  private _id: string;
  private readonly _type: string;

  constructor(name: string, id: string, type: string) {
    this._id = id;
    this._artifactName = name;
    this._type = type;
  }

  get id(): string {
    return this._id;
  }

  set id(value: string) {
    this._id = value;
  }

  getType(): string {
    return this._type;
  }

  getBuildCommand(): string | undefined {
    return this._buildCommand;
  }

  setBuildCommand(value: string | undefined) {
    this._buildCommand = value;
  }

  getBuildCommandComponents(): string[] | undefined {
    return this._buildCommandComponents;
  }

  setBuildCommandComponents(value: string[] | undefined) {
    this._buildCommandComponents = value;
  }

  getBuildType(): string | undefined {
    return this._buildType;
  }

  setBuildType(value: string | undefined) {
    this._buildType = value;
  }

  getToolchain(): string | undefined {
    return this._toolchain;
  }

  setToolchain(value: string | undefined) {
    this._toolchain = value;
  }

  getGroupName(): string | undefined {
    return this._groupName;
  }

  setGroupName(value: string | undefined) {
    this._groupName = value;
  }

  getAbi(): string | undefined {
    return this._abi;
  }

  setAbi(value: string | undefined) {
    this._abi = value;
  }

  getArtifactName(): string {
    return this._artifactName;
  }

  setArtifactName(value: string) {
    this._artifactName = value;
  }

  getFolders(): string[] | undefined {
    return this._folders;
  }

  setFolders(value: string[] | undefined) {
    this._folders = value;
  }

  getFiles(): string[] | undefined {
    return this._files;
  }

  setFiles(value: string[] | undefined) {
    this._files = value;
  }

  getHeaders(): string[] | undefined {
    return this._headers;
  }

  setHeaders(value: string[] | undefined) {
    this._headers = value;
  }

  getOutputs(): string[] {
    return this._outputs ?? [];
  }

  setOutputs(value: string[] | undefined) {
    this._outputs = value;
  }

  getRuntimeFiles(): string[] {
    return this._runtimeFiles ?? [];
  }

  setRuntimeFiles(value: string[] | undefined) {
    this._runtimeFiles = value;
  }

  getCodemodel(): NativeCodemodel | undefined {
    return this._codemodel;
  }

  setCodemodel(value: NativeCodemodel | undefined) {
    this._codemodel = value;
  }

  getNameOnDisk(): string | undefined {
    return this._nameOnDisk;
  }

  setNameOnDisk(value: string | undefined) {
    this._nameOnDisk = value;
  }

  getBuild(): string | undefined {
    return this._build;
  }

  setBuild(value: string | undefined) {
    this._build = value;
  }

  getSource(): string | undefined {
    return this._source;
  }

  setSource(value: string | undefined) {
    this._source = value;
  }
}
